(completion-list-mode-finish): New function.
authorGerd Moellmann <gerd@gnu.org>
Tue, 10 Apr 2001 14:48:08 +0000 (14:48 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 10 Apr 2001 14:48:08 +0000 (14:48 +0000)
(toplevel): Add completion-list-mode-finish to
temp-buffer-show-hook.

lisp/simple.el

index 9d2d78a8f44d4075b0b3b3820b502ae0d2a357b8..367bc2465fe600b0e202acd14bbd007911f9ab00 100644 (file)
@@ -3720,6 +3720,14 @@ Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\
   (setq completion-base-size nil)
   (run-hooks 'completion-list-mode-hook))
 
+(defun completion-list-mode-finish ()
+  "Finish setup of the completions buffer.
+Called from `temp-buffer-show-hook'."
+  (when (eq major-mode 'completion-list-mode)
+    (toggle-read-only 1)))
+
+(add-hook 'temp-buffer-show-hook 'completion-list-mode-finish)
+
 (defvar completion-setup-hook nil
   "Normal hook run at the end of setting up a completion list buffer.
 When this hook is run, the current buffer is the one in which the